package org.dromara.xhlj.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import org.dromara.starter.jpacomment.annotation.SailColumn;
import org.dromara.starter.jpacomment.annotation.SailIndex;
import org.dromara.starter.jpacomment.annotation.SailTable;
import org.dromara.starter.jpacomment.enums.IndexType;
/**
 * 动态讨论对象 xhlj_discussion
 *
 * @author yf
 * @date 2024-07-28
 */

@Data
@TableName("xhlj_discussion")
@Entity
@Table(name = "xhlj_discussion")
@SailTable(comment = "动态讨论表", indexs = {
    @SailIndex(name = "parent_discussion_idx", type = IndexType.BTREE,
       columns = {"parent_discussion_id"}
    ),    @SailIndex(name = "del_flag_idx", type = IndexType.BTREE,
       columns = {"del_flag"}
    ),    @SailIndex(name = "create_time_idx", type = IndexType.BTREE,
       columns = {"create_time"}
    ),    @SailIndex(name = "user_idx", type = IndexType.BTREE,
       columns = {"create_by"}
    )}
)
public class XhljDiscussion implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    public static final String TRANS_ID_TO_VO = "xhlj_discussion_vo";
    public static final String TRANS_ID_TO_VO_LIST = "xhlj_discussion_list";
    /**
     * 讨论id
     */
    @TableId(value = "discussion_id", type = IdType.AUTO)
    @Id
    private Integer discussionId;
    /**
     * 讨论内容
     */
    @Column(name = "discussion_content")
    @SailColumn(comment = "讨论内容",type = "text", defaultValue = "NULL")
    private String discussionContent;
    /**
     * 父亲讨论id
     */
    @Column(name = "parent_discussion_id")
    @SailColumn(comment = "父亲讨论id",type = "int", defaultValue = "NULL")
    private Integer parentDiscussionId;
    /**
     * 创建人wx_user（西湖论剑用户）
     */
    @SailColumn(comment = "创建人wx_user（西湖论剑用户）",type = "int", defaultValue = "NULL")
    @Column(name = "create_by")
    private Integer createBy;
    /**
     * 话题id
     */
    @SailColumn(comment = "话题id",type = "int", defaultValue = "NULL")
    @Column(name = "topic_id")
    private Integer topicId;
    /**
     * 点赞量
     */
    @Column(name = "thumbs_up_count")
    @SailColumn(comment = "点赞量",type = "int", defaultValue = "0")
    private Integer thumbsUpCount;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    @SailColumn(comment = "创建时间",type = "timestamp", defaultValue = "CURRENT_TIMESTAMP")
    private Date createTime;
    /**
     * 
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "del_flag")
    @SailColumn(comment = "",type = "varchar(255)", defaultValue = "NULL")
    private String delFlag;
}
